package com.zn.utils
{

	/**
	 *返回在一定概率下，当此是否成功 
	 * @author zn
	 * 
	 */	
    public class ThresholdUtil
    {
        public function ThresholdUtil()
        {
        }

        public static function Threshold(v:Number):Boolean
        {
            var threshold:Number = Math.round(Math.random() + v - 0.5);
            if (threshold >= 1)
                return true;
            else
                return false;
        }
    }
}